GBML manual / Rooms

room_next

Goes to the next room in room order, wrapping to the first past the last.

Syntax

room_next()

Returns

Nothing.

Description

Goes to the next room in room order (the order the editor's Room Editor tab lists them), wrapping back to the first room after the last one. A project with exactly one room "reloads" it, but not as a shortcut - it goes through the exact same transition pipeline room_change does: clearing every non-persistent instance, re-running the room's placed instances and creation code, playing whichever transition the room's own settings name.

Example

room_next();

Advances to whatever comes after the current room - a debug/playtesting shortcut, or a project that is deliberately a straight sequence of rooms (an arcade-style level order) rather than a hub-and-spoke layout navigated by name.

See also: room_change